package com.jy.rhin.model.body.xinshenger;


import com.jy.rhin.infra.cda.EDataElement;
import com.jy.rhin.infra.cda.XPath;
import com.jy.rhin.infra.cda.XValid;
import com.jy.rhin.model.CodeObject;
import lombok.Data;

import java.util.List;

@Data
public class XinShengE {

    //健康档案标识号
    @XPath(path = "/id[@root='2.16.156.10011.1.2']/@extension"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE01_00_009_00))
    String jianKangDABSH;
    //地址
    @XPath(path = "/addr/houseNumber/text()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_009_06))
    String diZhi;

    //街道
    @XPath(path = "/addr/streetName/text()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_009_05))
    String jieDao;

    //乡镇
    @XPath(path = "/addr/township/text()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_009_04))
    String xiangZhen;

    //区
    @XPath(path = "/addr/county/text()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_009_03))
    String qu;

    //市
    @XPath(path = "/addr/city/text()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_009_02 ))
    String shi;

    //省
    @XPath(path = "/addr/state/text()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_009_01 ))
    String sheng;

    //邮政编码
    @XPath(path = "/addr/postalCode/text()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_047_00, nullable=true))
    String youZhengBM;

    //新生儿身份证号
    @XPath(path = "/patient/id[@root='2.16.156.10011.1.3']/@extension"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_030_00))
    String zhengJianHM;

    //新生儿姓名
    @XPath(path = "/patient/name/text()"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_039_00))
    String xingMing;

    //性别
    @XPath(path = "/patient/administrativeGenderCode[@codeSystem='2.16.156.10011.2.3.3.4']"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_040_00))
    CodeObject xingBie;

    //出生日期
    @XPath(path = "/patient/birthTime/@value"
            , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE02_01_005_01))
    String chuShengRQ;

    @XPath(path = "/patient",
            listItemPath = "/guardian",
            listItemBackLevel=0)
    List<JianHuR> jianHuR;


}
